<?php
use app\models\user\gs\UsersBaseGsModel;
/**
 * Created by PhpStorm.
 * User: songs
 * Date: 2020/8/30
 * Time: 15:21
 */
$usercom = UsersBaseGsModel::find()->where([
    'uid' => $_GET['id']
])->one();
if (!$usercom) {
    $usercom = new UsersBaseGsModel();
}
$returnrray['comCity'] = $usercom->comCity;
$returnrray['com_address'] = $usercom->com_address;
$returnrray['com_name'] = $usercom->com_name;
$returnrray['com_tel'] = $usercom->com_tel;
$returnrray['legal_mobile'] = $usercom->legal_mobile;
$returnrray['legal_name'] = $usercom->legal_name;
$returnrray['legal_sex'] = $usercom->legal_sex;
$returnrray['position'] = $usercom->position;
$returnrray['detail'] = $usercom->detail;
$nianxiaoshou1 = $usercom->nianxiaoshou;
$returnrray['nianxiaoshou1'] = 0;
$returnrray['nianxiaoshou2'] = 0;
if ($nianxiaoshou1 && $nianxiaoshou1 != '') {
    $list = explode(',', $nianxiaoshou1);
    $returnrray['nianxiaoshou1'] = $list[0] ?? 0;
    $returnrray['nianxiaoshou2'] = $list[1] ?? 0;
} else {
    $returnrray['nianxiaoshou1'] = 0;
    $returnrray['nianxiaoshou2'] = 0;
}
?>
<div class="mui-content-padded H5body basedata">


        <div class="content">
            <ul class="baseul">
                <li class="li">
                    <p class="title">单位名称</p>
                    <input type="text" placeholder="请输入您的工作单位"
                           name="com_name" value="<?= $usercom->com_name ?>"
                           class="mui-input">
                </li>
                <li class="li">
                    <p class="title">法人姓名</p>
                    <input type="text" placeholder="请输入法人姓名"
                           name="legal_name" value="<?= $usercom->com_name ?>"
                           class="mui-input">
                </li>
                <li class="li">
                    <p class="title">性别</p>
                    <?= \yii\helpers\Html::dropDownList("legal_sex",2,[
                            ""=>'请选择性别',
                        \app\models\BaseUserModel::Sex_Nan=>'男',
                        \app\models\BaseUserModel::Sex_Nv=>'女',
                        \app\models\BaseUserModel::Sex_buxian=>'不限',
                    ]) ?>
                </li>
                <li class="li">
                    <p class="title">手机号</p>
                    <input type="text" placeholder="请输入您的手机号"
                           name="legal_mobile" value="<?= $usercom->com_name ?>"
                           class="mui-input">
                </li>
                <li class="li">
                    <p class="title">座机号</p>
                    <input type="text" placeholder="请输入您的座机号"
                           name="com_tel" value="<?= $usercom->com_name ?>"
                           class="mui-input">
                </li>
                <li class="li">
                    <p class="title">公司定位<span class="mui-icon mui-icon-location"></span></p>
                    <input id="comCity" type="text" placeholder="请获取您的定位"
                           name="comCity" value="<?= $usercom->com_name ?>"
                           class="mui-input">
                </li>


                <li class="li">
                    <p class="title">具体位置</p>
                    <input type="text" placeholder="具体到门牌号"
                           name="com_address" value="<?= $usercom->com_name ?>"
                           class="mui-input">
                </li>


                <li class="li">
                    <p class="title">年销售(万件)</p>
                    <div class="mui-numboxDiv">
                        <div id="age_range1" class="mui-numbox" data-numbox-step='1'
                             data-numbox-min='0' data-numbox-max='9990'>
                            <input value="<?= $returnrray['nianxiaoshou1'] ?>" name="nianxiaoshou1" class="mui-input-numbox" type="number"/>
                        </div>
                        <span>~</span>
                        <div class="mui-numbox" data-numbox-step='1' data-numbox-min='0' data-numbox-max='9990'>
                            <input value="<?= $returnrray['nianxiaoshou2'] ?>"  name="nianxiaoshou2" class="mui-input-numbox" type="number"/>

                        </div>
                    </div>
                </li>
                <li class="li">
                    <p class="title">公司简介 </p>
                    <input type="text" placeholder="请输入您的公司简介"
                           name="detail" value="<?= $usercom->com_name ?>"
                           class="mui-input">
                </li>

            </ul>

            <button class="savebtn btn  btn-info btn-sm">保存</button>



        </div>

</div>
